package com.citycloud.ccuap.tc.admin.entity;

import static org.springframework.data.mybatis.annotations.Id.GenerationType.AUTO;
import static org.springframework.data.mybatis.annotations.Id.GenerationType.ASSIGNATION;

import java.util.Date;

import org.springframework.data.annotation.Version;
import org.springframework.data.mybatis.annotations.Entity;
import org.springframework.data.mybatis.annotations.Column;
import org.springframework.data.mybatis.annotations.Condition;
import org.springframework.data.mybatis.annotations.Conditions;
import org.springframework.data.mybatis.annotations.Id;
import org.springframework.data.repository.query.parser.Part;

import com.citycloud.ccuap.framework.flexjson.transformer.annotation.Convertor;
import com.citycloud.ccuap.framework.service.Model;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 应用资源实体对象
 * @author zhusr
 *
 */
@Data
@NoArgsConstructor
@Entity(table = "sys_client_resource")
public class SysClientResource implements Model {
	private static final long serialVersionUID = 1L;
	
	@Id(strategy = ASSIGNATION)
	@Column(name = "resource_id")
	@Condition(type = Part.Type.LIKE,likeMatchMode = 3)
	private String resourceId;
	
	@Column(name = "resource_name")
	@Condition(type = Part.Type.LIKE,likeMatchMode = 3)
	private String resourceName;
	
	@Column(name = "resource_type")
	@Condition
	private Short resourceType;
	
	@Column(name = "remark")
	@Condition(type = Part.Type.LIKE)
	private String remark;
	
	@Column(name = "creator")
	@Condition(type = Part.Type.LIKE)
	private String creator;
	
	@Column(name = "created_time")
	@Conditions({ 
		@Condition,
		@Condition(type = Part.Type.GREATER_THAN_EQUAL, properties="startCreatedTime"), 
		@Condition(type = Part.Type.LESS_THAN, properties="endCreatedTime") 
	})
	private Date createdTime;
	
	@Column(name = "updator")
	@Condition(type = Part.Type.LIKE)
	private String updator;
	
	@Column(name = "updated_time")
	@Conditions({ 
		@Condition,
		@Condition(type = Part.Type.GREATER_THAN_EQUAL, properties="startUpdatedTime"), 
		@Condition(type = Part.Type.LESS_THAN, properties="endUpdatedTime") 
	})
	private Date updatedTime;
	


}